package com.flower8.service;

import com.flower8.model.SysConfig;
import com.flower8.utils.PageData;

import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author: tanglin
 * @Date: 2019/11/18 15:12
 * @Version: 1.0
 */
public interface SysConfigService {

    /**
     * 系统初始化
     */
    void init();

    /**
     * 查询App首页展示模块列表
     * @param pd
     * @return
     * @throws Exception
     */
    List<SysConfig> getHomeModelList(PageData pd) throws Exception;

    /**
     * 查询App首页展示模块数量
     * @param pd
     * @return
     * @throws Exception
     */
    int getHomeModelListCount(PageData pd) throws Exception;

    /**
     * 根据App首页展示模块的id查询
     * @param pd
     * @return
     */
    SysConfig getHomeModelById(PageData pd)throws Exception;

    /**
     * 更新app首页展示模块
     * @param sysConfig
     * @throws Exception
     */
    void updateHomeModel(SysConfig sysConfig)throws  Exception;

    /**
     * 删除app首页展示模块
     * @param id
     * @throws Exception
     */
    void deleteHomeModel(long id) throws  Exception;

    /**
     * 新增app首页展示模块
     * @param sysConfig
     * @throws Exception
     */
    void addHomeModel(SysConfig sysConfig)throws  Exception;

    /**
     * 后台管理系统配置信息
     * @return
     * @throws Exception
     */
    List<Map> getAdminSysInfo()throws Exception;

    /**
     * 奖池充值记录表
     * @param map
     * @throws Exception
     */
    void addAwardMoneyRecord(Map map)throws Exception;

    /**
     * 大转盘重新排座
     * @throws Exception
     */
    void newBigWheel()throws Exception;

    /**
     * 查询奖池金额
     * @return
     * @throws Exception
     */
    double getAwardPool()throws Exception;

    /**
     * 查询App数据字典配置
     * @param pd
     * @return
     * @throws Exception
     */
    List<Map> getAppDist(PageData pd)throws Exception;

    /**
     * 查询App数据字典配置数量
     * @param pd
     * @return
     * @throws Exception
     */
    int getAppDistCount(PageData pd)throws Exception;

    /**
     * 新增App字典数据
     * @param param
     * @throws Exception
     */
    void addAppDict(Map param) throws Exception;

    /**
     * 修改App字典数据
     * @param param
     * @throws Exception
     */
    void updAppDict(Map param) throws Exception;

    /**
     * 删除App字典数据
     * @param id
     * @throws Exception
     */
    void deleteAppDict(long id) throws Exception;

    /**
     * 通过app字典的id查询
     * @param id
     * @return
     * @throws Exception
     */
    Map getAppDictById(long id) throws Exception;

    /**
     *根据code 查询字典
     * @param code
     * @throws Exception
     */
    Map getSysDist(String code)throws Exception;
}
